package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HmzCompletenessMapper;
import com.ruoyi.system.domain.HmzCompleteness;
import com.ruoyi.system.service.IHmzCompletenessService;

/**
 * 完残程度Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-25
 */
@Service
public class HmzCompletenessServiceImpl implements IHmzCompletenessService 
{
    @Autowired
    private HmzCompletenessMapper hmzCompletenessMapper;

    /**
     * 查询完残程度
     * 
     * @param id 完残程度主键
     * @return 完残程度
     */
    @Override
    public HmzCompleteness selectHmzCompletenessById(Long id)
    {
        return hmzCompletenessMapper.selectHmzCompletenessById(id);
    }

    /**
     * 查询完残程度列表
     * 
     * @param hmzCompleteness 完残程度
     * @return 完残程度
     */
    @Override
    public List<HmzCompleteness> selectHmzCompletenessList(HmzCompleteness hmzCompleteness)
    {
        return hmzCompletenessMapper.selectHmzCompletenessList(hmzCompleteness);
    }

    /**
     * 新增完残程度
     * 
     * @param hmzCompleteness 完残程度
     * @return 结果
     */
    @Override
    public int insertHmzCompleteness(HmzCompleteness hmzCompleteness)
    {
        hmzCompleteness.setCreateTime(DateUtils.getNowDate());
        return hmzCompletenessMapper.insertHmzCompleteness(hmzCompleteness);
    }

    /**
     * 修改完残程度
     * 
     * @param hmzCompleteness 完残程度
     * @return 结果
     */
    @Override
    public int updateHmzCompleteness(HmzCompleteness hmzCompleteness)
    {
        hmzCompleteness.setUpdateTime(DateUtils.getNowDate());
        return hmzCompletenessMapper.updateHmzCompleteness(hmzCompleteness);
    }

    /**
     * 批量删除完残程度
     * 
     * @param ids 需要删除的完残程度主键
     * @return 结果
     */
    @Override
    public int deleteHmzCompletenessByIds(Long[] ids)
    {
        return hmzCompletenessMapper.deleteHmzCompletenessByIds(ids);
    }

    /**
     * 删除完残程度信息
     * 
     * @param id 完残程度主键
     * @return 结果
     */
    @Override
    public int deleteHmzCompletenessById(Long id)
    {
        return hmzCompletenessMapper.deleteHmzCompletenessById(id);
    }
}
